package com.qiaoan.back.dao.sys;

import com.qiaoan.back.dao.SqlMapper;
import com.qiaoan.back.model.sys.GroupModel;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * Created by eversec on 2017/5/12.
 */
@Repository
public interface GroupDao extends SqlMapper{


    @Insert("insert into t_group(group_name, enable, create_time, update_time, create_id, pid, level, update_id) values(#{group_name}, #{enable}, #{create_time}," +
            "#{update_time}, #{create_id}, #{pid}, #{level}, #{update_id})")
    int insert(GroupModel Group);


    @Select("select * from t_group where id = #{id}")
    public GroupModel getGroupById(int id);

}
